package sicnu.cs.ich.api.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 黎琦
 * @date 2021/12/2 18:49
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CommentVO implements Serializable {

    private String userId;
    private String nickname;
    private String avaterUrl;

    private Integer id;
    private Integer activityId;
    private Integer parentId;
    private Integer ancestorId;
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    private Long likeNum;

    /**
     * 一级评论的parentId=0，parentName=null
     */
    private String parentName;
    private List<CommentVO> replayList;
}
